$(document).ready(function() {
	console.log("sucess");
	$.ajax({
		url:"/dormms/super/queryUserRoleByPage",
        type:"post",
        data:{"currPage":1,"pageSize":3},
        success:function(data){
        	console.log(data);
        	//queryUserRoleByPage(data);
        }
	});
});

function queryUserRoleByPage(data) {
	var options = {
			bootstrapMajorVersion: 3,
			currentPage: data.currPage,
            totalPages: data.pages,
            numberofPages: 5,
            itemTexts: function(type, page, current) { //修改显示文字
                switch (type) {
                case "first":
                    return "第一页";
                case "prev":
                    return "上一页";
                case "next":
                    return "下一页";
                case "last":
                    return "最后一页";
                case "page":
                    return page;
                }
            },
            onPageClicked: function (event, originalEvent, type, page) { //异步换页
            	console.log(page);
            },
	};
	$('#page').bootstrapPaginator(options); 
}